﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using Cms.Core.Application.Secutiry.Token;
using System.Security.Claims;

namespace Cms.Core.Application.Secutiry
{
    /// <summary>
    /// 在线用户
    /// </summary>
    public class OnlineUser : OnlineUser<Guid>
    {
        /// <summary>
        /// 
        /// </summary>
        public OnlineUser()
        {
            Roles = new List<string>();

        }

        /// <summary>
        /// 获取或设置 用户名
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 获取或设置 用户昵称
        /// </summary>
        public string NickName { get; set; }


        /// <summary>
        /// 获取或设置 是否管理
        /// </summary>
        public bool IsAdmin { get; set; }

        /// <summary>
        /// 获取或设置 用户角色
        /// </summary>
        public IEnumerable<string> Roles { get; set; }

      





    }

    /// <summary>
    /// 
    /// </summary>
    /// <typeparam name="TMdoel"></typeparam>
    public class OnlineUser<TMdoel>
    {
        /// <summary>
        /// 用户ID
        /// </summary>
        public virtual TMdoel Id { get; set; }
    }
}
